{% extends "base.html" %}
{% from 'bootstrap5/form.html' import render_form, render_hidden_errors, render_form_row %}
{% from 'bootstrap5/utils.html' import render_messages %}

{% block styles %}
{{ bootstrap.load_css() }}
{% endblock %}
{% block head_add %}
    <link rel="stylesheet" type="text/css" href="../static/css/advance.css">
{% endblock %}

{% block page_content %}
<div class="container">
    <div class="row">
        <div class="advanced-search-container">
            <h2>高级检索</h2>
            <hr/>
            <form method="POST">
                {{ render_messages() }}
                {{ render_hidden_errors(form) }}
                {{ form.csrf_token }}
  <div class="row">
                    <div class="col-8">{{ render_form_row([form.all_these_words],form_type ="horizontal") }}</div>
                    <div class="col-4 col-form-label">请输入要搜索的关键词</div>
                </div>
                <div class="row">
                    <div class="col-8">{{ render_form_row([form.this_exact_word_or_phrase],form_type ="horizontal") }}</div>
                    <div class="col-4 col-form-label">请输入希望网页能完全匹配的关键词</div>
                </div>
                <div class="row">
                    <div class="col-8">{{ render_form_row([form.any_of_these_words],form_type ="horizontal") }}</div>
                    <div class="col-4 col-form-label">请输入希望网页能部分匹配的关键词</div>
                </div>
                <div class="row">
                    <div class="col-8">{{ render_form_row([form.none_of_these_words],form_type ="horizontal") }}</div>
                    <div class="col-4 col-form-label">请输入不希望网页包含的关键词</div>
                </div>
                <div class="row">
                    <div class="col-8">{{ render_form_row([form.site_or_domain],form_type ="horizontal") }}</div>
                    <div class="col-4 col-form-label">请输入限制的网站或者域名</div>
                </div>
                <div class="row">
                    <div class="col-8">{{ render_form_row([form.time_limit],form_type ="horizontal") }}</div>
                    <div class="col-4 col-form-label">请输入限制的时间</div>
                </div>
                <div class="row">
                    <div class="col-8">{{ render_form_row([form.is_title_only],form_type ="horizontal") }}</div>
                    <div class="col-4 col-form-label">请选择关键词出现的位置</div>
                </div>
                {{ render_form_row([form.submit], form_type ="horizontal") }}
            </form>
        </div>
    </div>
</div>
{% endblock %}